import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

export default defineConfig({
  plugins: [vue()],
  build: {
    assetsInlineLimit: 0 // 确保图标文件不被内联
  },
  server: {
    port: 5173,
    host: '0.0.0.0',
    open: true,
    strictPort: true
  },
  build: {
    outDir: 'dist',
    assetsDir: 'assets',
    emptyOutDir: true
  },
  optimizeDeps: {
    include: [
      'vue',
      'element-plus',
      '@vitejs/plugin-vue'
    ]
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  }
})
